package com.project.controller.reviewController;

import com.project.bean.ReviewBean;
import com.project.service.reviewService.IReviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/review")
public class ReviewController {
    @Autowired
    private IReviewService reviewService;

    @RequestMapping("/addGoodsReview")
    public String addGoodsReview(ReviewBean review, int goodsId) {
        reviewService.addGoodsReview(review, goodsId);
        return "ok";
    }

    @RequestMapping("/addServeReview")
    public String addServeReview(ReviewBean review, int serveId) {
        reviewService.addServeReview(review, serveId);
        return "ok";
    }

}
